import 'antd/dist/antd.css';
import styles from './index.css';
import http_utils from '@/utils/http_utils';
import React from 'react';
import { Layout, Space } from 'antd';

import { PlusOutlined } from '@ant-design/icons/lib';
import { Link } from 'react-router-dom';

const { Footer } = Layout;
const titleContent = '我的兴趣爱好分享', titleDesc = '管理界面';

window.$http = http_utils;

// const tabUri = {
//   '/': 'Home',
//   '/category': 'Category',
//   '/tag': 'Tag',
//   '/about': 'About',
//   '/search': 'Search',
// };

function AdminLayout(props) {
  // const titleContent = 'Aglaia', titleDesc = 'desc';

  return (
    <div className={styles.normal}>
      <Layout style={{ display: 'flex', height: '100%' }}>
        <div className={styles.title}>
          <h1 style={{ fontSize: 33, minHeight: 45, margin: '0 auto' }}>
            <Link to={'/manage'} style={{ color: 'white' }}>{titleContent}</Link>
          </h1>
          <h4 style={{ color: 'white', fontSize: 10, marginBottom: 0 }}>{titleDesc}</h4>
          <Link style={{ position: 'absolute', color: 'white', fontSize: 25, top: 19, right: 25 }} to={'/search'}>
            <PlusOutlined size={'small'}/></Link>
        </div>
        {/*<Header style={{*/}
        {/*  zIndex: 1, width: '100%', backgroundColor: '#656565',*/}
        {/*  // position: 'fixed'*/}
        {/*}}>*/}
        {/*  <Menu style={{ backgroundColor: '#656565', height: 65, textAlign: 'center' }}*/}
        {/*        theme="light" mode="horizontal" defaultSelectedKeys={[tabUri[props.history.location.pathname]]}>*/}
        {/*    <Menu.Item key="Home" icon={<HomeOutlined/>}><Link to={'/'}>首页</Link></Menu.Item>*/}
        {/*    /!*<Menu.Item key="Category" icon={<ProfileOutlined/>}><Link to={'/category'}>分类</Link></Menu.Item>*!/*/}
        {/*    /!*<Menu.Item key="Tag" icon={<TagOutlined/>}><Link to={'/tag'}>标签</Link></Menu.Item>*!/*/}
        {/*    <Menu.Item key="About" icon={<UserOutlined/>}><Link to={'/about'}>关于</Link></Menu.Item>*/}
        {/*    <Menu.Item key="Search" icon={<SearchOutlined/>}><Link to={'/search'}>搜索</Link></Menu.Item>*/}
        {/*  </Menu>*/}
        {/*</Header>*/}
        <div style={{ backgroundColor: '#eee', flex: 1 }}>
          {props.children}
        </div>

        <Footer style={{ textAlign: 'center' }}>
          <Space size={10}>
            <span>moyrn ©2020</span>
            <a href={'http://beian.miit.gov.cn/'}
               style={{ color: 'rgba(0, 0, 0, 0.65)', textDecoration: 'underline' }}>湘ICP备17013168号-4</a>
          </Space>
        </Footer>
      </Layout>
    </div>
  );
}

export default AdminLayout;
